<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta charset="utf-8" />
    <title>API reference &#8212; geosnap v0.3.1 Manual</title>
    <link rel="stylesheet" href="_static/bootstrap-sphinx.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    <link rel="stylesheet" type="text/css" href="_static/pysal-styles.css" />
    <script id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
    <script src="_static/jquery.js"></script>
    <script src="_static/underscore.js"></script>
    <script src="_static/doctools.js"></script>
    <script src="_static/language_data.js"></script>
    <link rel="shortcut icon" href="_static/geosnap.ico"/>
    <link rel="index" title="Index" href="genindex.html" />
    <link rel="search" title="Search" href="search.html" />
    <link rel="next" title="geosnap.io.store_census" href="generated/geosnap.io.store_census.html" />
    <link rel="prev" title="Installation" href="installation.html" />
<meta charset='utf-8'>
<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'>
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1'>
<meta name="apple-mobile-web-app-capable" content="yes">
<script type="text/javascript" src="_static/js/jquery-1.11.0.min.js "></script>
<script type="text/javascript" src="_static/js/jquery-fix.js "></script>
<script type="text/javascript" src="_static/bootstrap-3.3.7/js/bootstrap.min.js "></script>
<script type="text/javascript" src="_static/bootstrap-sphinx.js "></script>

  </head><body>

  <div id="navbar" class="navbar navbar-default navbar-fixed-top">
    <div class="container">
      <div class="navbar-header">
        <!-- .btn-navbar is used as the toggle for collapsed navbar content -->
        <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".nav-collapse">
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
        </button>
        <a class="navbar-brand" href="index.html"><span><img src="_static/geosnap.svg"></span>
          geosnap</a>
        <span class="navbar-text navbar-version pull-left"><b>0.3.1</b></span>
      </div>

        <div class="collapse navbar-collapse nav-collapse">
          <ul class="nav navbar-nav">
            
                <li><a href="installation.html">Installation</a></li>
                <li><a href="#">API</a></li>
                <li><a href="data.html">Data</a></li>
                <li><a href="https://spatialucr.github.io/geosnap-guide/">User Guide</a></li>
                <li><a href="references.html">References</a></li>
            
            
              <li class="dropdown globaltoc-container">
  <a role="button"
     id="dLabelGlobalToc"
     data-toggle="dropdown"
     data-target="#"
     href="index.html">Site <b class="caret"></b></a>
  <ul class="dropdown-menu globaltoc"
      role="menu"
      aria-labelledby="dLabelGlobalToc"><p class="caption"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a><ul>
<li class="toctree-l2"><a class="reference internal" href="installation.html#installing-a-released-version">Installing a released version</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation.html#installing-development-version">Installing development version</a></li>
</ul>
</li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">API</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#io-module">IO Module</a></li>
<li class="toctree-l2"><a class="reference internal" href="#the-community-class">The Community Class</a></li>
<li class="toctree-l2"><a class="reference internal" href="#analyze-module">Analyze Module</a></li>
<li class="toctree-l2"><a class="reference internal" href="#harmonize-module">Harmonize Module</a></li>
<li class="toctree-l2"><a class="reference internal" href="#visualize-module">Visualize Module</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="references.html">References</a></li>
<li class="toctree-l1"><a class="reference internal" href="data.html">Data</a><ul>
<li class="toctree-l2"><a class="reference internal" href="data.html#tabular-data">Tabular Data</a></li>
<li class="toctree-l2"><a class="reference internal" href="data.html#geo-data">Geo Data</a></li>
</ul>
</li>
</ul>
</ul>
</li>
              
                <li class="dropdown">
  <a role="button"
     id="dLabelLocalToc"
     data-toggle="dropdown"
     data-target="#"
     href="#">Page <b class="caret"></b></a>
  <ul class="dropdown-menu localtoc"
      role="menu"
      aria-labelledby="dLabelLocalToc"><ul>
<li><a class="reference internal" href="#">API reference</a><ul>
<li><a class="reference internal" href="#io-module">IO Module</a><ul>
<li><a class="reference internal" href="#storing-data">Storing data</a></li>
<li><a class="reference internal" href="#accessing-stored-datasets">Accessing Stored Datasets</a></li>
</ul>
</li>
<li><a class="reference internal" href="#the-community-class">The Community Class</a><ul>
<li><a class="reference internal" href="#community-constructors">Community Constructors</a></li>
<li><a class="reference internal" href="#community-analytics">Community Analytics</a></li>
</ul>
</li>
<li><a class="reference internal" href="#analyze-module">Analyze Module</a><ul>
<li><a class="reference internal" href="#neighborhood-clustering-methods">Neighborhood Clustering Methods</a><ul>
<li><a class="reference internal" href="#clustering-algorithms">Clustering algorithms</a><ul>
<li><a class="reference internal" href="#classic-aspatial-clustering">Classic (aspatial) Clustering</a></li>
<li><a class="reference internal" href="#spatial-clustering">Spatial Clustering</a></li>
</ul>
</li>
</ul>
</li>
<li><a class="reference internal" href="#neighborhood-dynamics-methods">Neighborhood Dynamics Methods</a></li>
</ul>
</li>
<li><a class="reference internal" href="#harmonize-module">Harmonize Module</a></li>
<li><a class="reference internal" href="#visualize-module">Visualize Module</a></li>
</ul>
</li>
</ul>
</ul>
</li>
              
            
            
            
            
            
          </ul>

          
            
<form class="navbar-form navbar-right" action="search.html" method="get">
 <div class="form-group">
  <input type="text" name="q" class="form-control" placeholder="Search" />
 </div>
  <input type="hidden" name="check_keywords" value="yes" />
  <input type="hidden" name="area" value="default" />
</form>
          
        </div>
    </div>
  </div>

<div class="container">
  <div class="row">
    <div class="body col-md-12 content" role="main">
      
  <div class="section" id="api-reference">
<span id="api-ref"></span><h1>API reference<a class="headerlink" href="#api-reference" title="Permalink to this headline">¶</a></h1>
<div class="section" id="io-module">
<span id="data-api"></span><h2>IO Module<a class="headerlink" href="#io-module" title="Permalink to this headline">¶</a></h2>
<div class="section" id="storing-data">
<h3>Storing data<a class="headerlink" href="#storing-data" title="Permalink to this headline">¶</a></h3>
<p>geosnap’s <cite>io</cite> module provides functions for collecting and storing a variety of datasets
including U.S. Census data from 1990-2010, LEHD data from any vintage, and external longitudinal databases.</p>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/geosnap.io.store_census.html#geosnap.io.store_census" title="geosnap.io.store_census"><code class="xref py py-obj docutils literal notranslate"><span class="pre">io.store_census</span></code></a>([dest])</p></td>
<td><p>Save census data to the local quilt package storage.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/geosnap.io.store_blocks_2000.html#geosnap.io.store_blocks_2000" title="geosnap.io.store_blocks_2000"><code class="xref py py-obj docutils literal notranslate"><span class="pre">io.store_blocks_2000</span></code></a>([dest])</p></td>
<td><p>Save census 2000 census block data to the local quilt package storage.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/geosnap.io.store_blocks_2010.html#geosnap.io.store_blocks_2010" title="geosnap.io.store_blocks_2010"><code class="xref py py-obj docutils literal notranslate"><span class="pre">io.store_blocks_2010</span></code></a>([dest])</p></td>
<td><p>Save census 2010 census block data to the local quilt package storage.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/geosnap.io.store_ltdb.html#geosnap.io.store_ltdb" title="geosnap.io.store_ltdb"><code class="xref py py-obj docutils literal notranslate"><span class="pre">io.store_ltdb</span></code></a>(sample, fullcount)</p></td>
<td><p>Read &amp; store data from Brown’s Longitudinal Tract Database (LTDB).</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/geosnap.io.store_ncdb.html#geosnap.io.store_ncdb" title="geosnap.io.store_ncdb"><code class="xref py py-obj docutils literal notranslate"><span class="pre">io.store_ncdb</span></code></a>(filepath)</p></td>
<td><p>Read &amp; store data from Geolytics’s Neighborhood Change Database.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/geosnap.io.get_lehd.html#geosnap.io.get_lehd" title="geosnap.io.get_lehd"><code class="xref py py-obj docutils literal notranslate"><span class="pre">io.get_lehd</span></code></a>([dataset, state, year])</p></td>
<td><p>Grab data from the LODES FTP server as a pandas DataFrame.</p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="accessing-stored-datasets">
<h3>Accessing Stored Datasets<a class="headerlink" href="#accessing-stored-datasets" title="Permalink to this headline">¶</a></h3>
<p>It also provides a storage container <cite>datasets</cite> that provides access to datasets that have been imported with the functions above</p>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/geosnap.datasets.html#geosnap.datasets" title="geosnap.datasets"><code class="xref py py-obj docutils literal notranslate"><span class="pre">datasets</span></code></a></p></td>
<td><p>Storage for geosnap data.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/geosnap.datasets.blocks_2000.html#geosnap.datasets.blocks_2000" title="geosnap.datasets.blocks_2000"><code class="xref py py-obj docutils literal notranslate"><span class="pre">datasets.blocks_2000</span></code></a>([states, convert, fips])</p></td>
<td><p>Census blocks for 2000.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/geosnap.datasets.blocks_2010.html#geosnap.datasets.blocks_2010" title="geosnap.datasets.blocks_2010"><code class="xref py py-obj docutils literal notranslate"><span class="pre">datasets.blocks_2010</span></code></a>([states, convert, fips])</p></td>
<td><p>Census blocks for 2010.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/geosnap.datasets.codebook.html#geosnap.datasets.codebook" title="geosnap.datasets.codebook"><code class="xref py py-obj docutils literal notranslate"><span class="pre">datasets.codebook</span></code></a>()</p></td>
<td><p>Codebook.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/geosnap.datasets.counties.html#geosnap.datasets.counties" title="geosnap.datasets.counties"><code class="xref py py-obj docutils literal notranslate"><span class="pre">datasets.counties</span></code></a>()</p></td>
<td><p>Nationwide counties as drawn in 2010.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/geosnap.datasets.ltdb.html#geosnap.datasets.ltdb" title="geosnap.datasets.ltdb"><code class="xref py py-obj docutils literal notranslate"><span class="pre">datasets.ltdb</span></code></a>()</p></td>
<td><p>Longitudinal Tract Database (LTDB).</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/geosnap.datasets.msa_definitions.html#geosnap.datasets.msa_definitions" title="geosnap.datasets.msa_definitions"><code class="xref py py-obj docutils literal notranslate"><span class="pre">datasets.msa_definitions</span></code></a>()</p></td>
<td><p>2010 Metropolitan Statistical Area definitions.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/geosnap.datasets.msas.html#geosnap.datasets.msas" title="geosnap.datasets.msas"><code class="xref py py-obj docutils literal notranslate"><span class="pre">datasets.msas</span></code></a>([convert])</p></td>
<td><p>Metropolitan Statistical Areas as drawn in 2010.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/geosnap.datasets.ncdb.html#geosnap.datasets.ncdb" title="geosnap.datasets.ncdb"><code class="xref py py-obj docutils literal notranslate"><span class="pre">datasets.ncdb</span></code></a>()</p></td>
<td><p>Geolytics Neighborhood Change Database (NCDB).</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/geosnap.datasets.states.html#geosnap.datasets.states" title="geosnap.datasets.states"><code class="xref py py-obj docutils literal notranslate"><span class="pre">datasets.states</span></code></a>([convert])</p></td>
<td><p>States.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/geosnap.datasets.tracts_1990.html#geosnap.datasets.tracts_1990" title="geosnap.datasets.tracts_1990"><code class="xref py py-obj docutils literal notranslate"><span class="pre">datasets.tracts_1990</span></code></a>([states, convert])</p></td>
<td><p>Nationwide Census Tracts as drawn in 1990 (cartographic 500k).</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/geosnap.datasets.tracts_2000.html#geosnap.datasets.tracts_2000" title="geosnap.datasets.tracts_2000"><code class="xref py py-obj docutils literal notranslate"><span class="pre">datasets.tracts_2000</span></code></a>([states, convert])</p></td>
<td><p>Nationwide Census Tracts as drawn in 2000 (cartographic 500k).</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/geosnap.datasets.tracts_2010.html#geosnap.datasets.tracts_2010" title="geosnap.datasets.tracts_2010"><code class="xref py py-obj docutils literal notranslate"><span class="pre">datasets.tracts_2010</span></code></a>([states, convert])</p></td>
<td><p>Nationwide Census Tracts as drawn in 2010 (cartographic 500k).</p></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="the-community-class">
<h2>The Community Class<a class="headerlink" href="#the-community-class" title="Permalink to this headline">¶</a></h2>
<p>The <cite>Community</cite> is the central construct in geonap used to hold spatiotemporal neighborhood data.
The most common way to interact with geosnap is by instantiating a Community using a constructor method,
then using analytical methods upon the community</p>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/geosnap.Community.html#geosnap.Community" title="geosnap.Community"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Community</span></code></a>([gdf, harmonized])</p></td>
<td><p>Spatial and tabular data for a collection of “neighborhoods” over time.</p></td>
</tr>
</tbody>
</table>
<div class="section" id="community-constructors">
<h3>Community Constructors<a class="headerlink" href="#community-constructors" title="Permalink to this headline">¶</a></h3>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/geosnap.Community.from_census.html#geosnap.Community.from_census" title="geosnap.Community.from_census"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Community.from_census</span></code></a>([state_fips, …])</p></td>
<td><p>Create a new Community from original vintage US Census data.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/geosnap.Community.from_geodataframes.html#geosnap.Community.from_geodataframes" title="geosnap.Community.from_geodataframes"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Community.from_geodataframes</span></code></a>([gdfs])</p></td>
<td><p>Create a new Community from a list of geodataframes.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/geosnap.Community.from_lodes.html#geosnap.Community.from_lodes" title="geosnap.Community.from_lodes"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Community.from_lodes</span></code></a>([state_fips, …])</p></td>
<td><p>Create a new Community from Census LEHD/LODES data.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/geosnap.Community.from_ltdb.html#geosnap.Community.from_ltdb" title="geosnap.Community.from_ltdb"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Community.from_ltdb</span></code></a>([state_fips, …])</p></td>
<td><p>Create a new Community from LTDB data.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/geosnap.Community.from_ncdb.html#geosnap.Community.from_ncdb" title="geosnap.Community.from_ncdb"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Community.from_ncdb</span></code></a>([state_fips, …])</p></td>
<td><p>Create a new Community from NCDB data.</p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="community-analytics">
<span id="analyze-api"></span><h3>Community Analytics<a class="headerlink" href="#community-analytics" title="Permalink to this headline">¶</a></h3>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/geosnap.Community.cluster.html#geosnap.Community.cluster" title="geosnap.Community.cluster"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Community.cluster</span></code></a>(self[, n_clusters, …])</p></td>
<td><p>Create a geodemographic typology by running a cluster analysis on the study area’s neighborhood attributes.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/geosnap.Community.cluster_spatial.html#geosnap.Community.cluster_spatial" title="geosnap.Community.cluster_spatial"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Community.cluster_spatial</span></code></a>(self[, …])</p></td>
<td><p>Create a <em>spatial</em> geodemographic typology by running a cluster analysis on the metro area’s neighborhood attributes and including a contiguity constraint.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/geosnap.Community.harmonize.html#geosnap.Community.harmonize" title="geosnap.Community.harmonize"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Community.harmonize</span></code></a>(self[, target_year, …])</p></td>
<td><p>Standardize inconsistent boundaries into time-static ones.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/geosnap.Community.sequence.html#geosnap.Community.sequence" title="geosnap.Community.sequence"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Community.sequence</span></code></a>(self, cluster_col[, …])</p></td>
<td><p>Pairwise sequence analysis to evaluate the distance/dissimilarity between every two neighborhood sequences.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/geosnap.Community.transition.html#geosnap.Community.transition" title="geosnap.Community.transition"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Community.transition</span></code></a>(self, cluster_col[, …])</p></td>
<td><p>(Spatial) Markov approach to transitional dynamics of neighborhoods.</p></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="analyze-module">
<h2>Analyze Module<a class="headerlink" href="#analyze-module" title="Permalink to this headline">¶</a></h2>
<div class="section" id="neighborhood-clustering-methods">
<h3>Neighborhood Clustering Methods<a class="headerlink" href="#neighborhood-clustering-methods" title="Permalink to this headline">¶</a></h3>
<p>Model neighborhood differentiation using multivariate clustering algorithms</p>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/geosnap.analyze.cluster.html#geosnap.analyze.cluster" title="geosnap.analyze.cluster"><code class="xref py py-obj docutils literal notranslate"><span class="pre">analyze.cluster</span></code></a>(gdf[, n_clusters, method, …])</p></td>
<td><p>Create a geodemographic typology by running a cluster analysis on the study area’s neighborhood attributes.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/geosnap.analyze.cluster_spatial.html#geosnap.analyze.cluster_spatial" title="geosnap.analyze.cluster_spatial"><code class="xref py py-obj docutils literal notranslate"><span class="pre">analyze.cluster_spatial</span></code></a>(gdf[, n_clusters, …])</p></td>
<td><p>Create a <em>spatial</em> geodemographic typology by running a cluster analysis on the metro area’s neighborhood attributes and including a contiguity constraint.</p></td>
</tr>
</tbody>
</table>
<div class="section" id="clustering-algorithms">
<h4>Clustering algorithms<a class="headerlink" href="#clustering-algorithms" title="Permalink to this headline">¶</a></h4>
<p>The following algorithms may be passed to <cite>geosnap.analyze.cluster</cite> or <cite>geosnap.analyze.cluster_spatial</cite> but they should not be called directly</p>
<div class="section" id="classic-aspatial-clustering">
<h5>Classic (aspatial) Clustering<a class="headerlink" href="#classic-aspatial-clustering" title="Permalink to this headline">¶</a></h5>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/geosnap.analyze.analytics.affinity_propagation.html#geosnap.analyze.analytics.affinity_propagation" title="geosnap.analyze.analytics.affinity_propagation"><code class="xref py py-obj docutils literal notranslate"><span class="pre">affinity_propagation</span></code></a>(X[, damping, …])</p></td>
<td><p>Clustering with Affinity Propagation.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/geosnap.analyze.analytics.gaussian_mixture.html#geosnap.analyze.analytics.gaussian_mixture" title="geosnap.analyze.analytics.gaussian_mixture"><code class="xref py py-obj docutils literal notranslate"><span class="pre">gaussian_mixture</span></code></a>(X[, n_clusters, …])</p></td>
<td><p>Clustering with Gaussian Mixture Model.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/geosnap.analyze.analytics.hdbscan.html#geosnap.analyze.analytics.hdbscan" title="geosnap.analyze.analytics.hdbscan"><code class="xref py py-obj docutils literal notranslate"><span class="pre">hdbscan</span></code></a>(X[, min_cluster_size, gen_min_span_tree])</p></td>
<td><p>Clustering with Hierarchical DBSCAN.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/geosnap.analyze.analytics.kmeans.html#geosnap.analyze.analytics.kmeans" title="geosnap.analyze.analytics.kmeans"><code class="xref py py-obj docutils literal notranslate"><span class="pre">kmeans</span></code></a>(X, n_clusters[, init, n_init, …])</p></td>
<td><p>K-Means clustering.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/geosnap.analyze.analytics.spectral.html#geosnap.analyze.analytics.spectral" title="geosnap.analyze.analytics.spectral"><code class="xref py py-obj docutils literal notranslate"><span class="pre">spectral</span></code></a>(X, n_clusters[, eigen_solver, …])</p></td>
<td><p>Spectral Clustering.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/geosnap.analyze.analytics.ward.html#geosnap.analyze.analytics.ward" title="geosnap.analyze.analytics.ward"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ward</span></code></a>(X[, n_clusters])</p></td>
<td><p>Agglomerative clustering using Ward linkage.</p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="spatial-clustering">
<h5>Spatial Clustering<a class="headerlink" href="#spatial-clustering" title="Permalink to this headline">¶</a></h5>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/geosnap.analyze.analytics.azp.html#geosnap.analyze.analytics.azp" title="geosnap.analyze.analytics.azp"><code class="xref py py-obj docutils literal notranslate"><span class="pre">azp</span></code></a>(X, w[, n_clusters])</p></td>
<td><p>AZP clustering algorithm.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/geosnap.analyze.analytics.max_p.html#geosnap.analyze.analytics.max_p" title="geosnap.analyze.analytics.max_p"><code class="xref py py-obj docutils literal notranslate"><span class="pre">max_p</span></code></a>(X, w[, threshold_variable, threshold])</p></td>
<td><p>Max-p clustering algorithm <a class="reference internal" href="references.html#duque2012" id="id1">[DAR12]</a>.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/geosnap.analyze.analytics.skater.html#geosnap.analyze.analytics.skater" title="geosnap.analyze.analytics.skater"><code class="xref py py-obj docutils literal notranslate"><span class="pre">skater</span></code></a>(X, w[, n_clusters, floor, trace, islands])</p></td>
<td><p>SKATER spatial clustering algorithm.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/geosnap.analyze.analytics.spenc.html#geosnap.analyze.analytics.spenc" title="geosnap.analyze.analytics.spenc"><code class="xref py py-obj docutils literal notranslate"><span class="pre">spenc</span></code></a>(X, w[, n_clusters, gamma])</p></td>
<td><p>Spatially encouraged spectral clustering.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/geosnap.analyze.analytics.ward_spatial.html#geosnap.analyze.analytics.ward_spatial" title="geosnap.analyze.analytics.ward_spatial"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ward_spatial</span></code></a>(X, w[, n_clusters])</p></td>
<td><p>Agglomerative clustering using Ward linkage with a spatial connectivity constraint.</p></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="section" id="neighborhood-dynamics-methods">
<h3>Neighborhood Dynamics Methods<a class="headerlink" href="#neighborhood-dynamics-methods" title="Permalink to this headline">¶</a></h3>
<p>Model neighborhood change using optimal-matching algorithms or spatial discrete markov chains</p>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/geosnap.analyze.linc.html#geosnap.analyze.linc" title="geosnap.analyze.linc"><code class="xref py py-obj docutils literal notranslate"><span class="pre">analyze.linc</span></code></a>(labels_sequence)</p></td>
<td><p>Local Indicator of Neighborhood Change</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/geosnap.analyze.sequence.html#geosnap.analyze.sequence" title="geosnap.analyze.sequence"><code class="xref py py-obj docutils literal notranslate"><span class="pre">analyze.sequence</span></code></a>(gdf, cluster_col[, …])</p></td>
<td><p>Pairwise sequence analysis and sequence clustering.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/geosnap.analyze.transition.html#geosnap.analyze.transition" title="geosnap.analyze.transition"><code class="xref py py-obj docutils literal notranslate"><span class="pre">analyze.transition</span></code></a>(gdf, cluster_col[, …])</p></td>
<td><p>(Spatial) Markov approach to transitional dynamics of neighborhoods.</p></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="harmonize-module">
<span id="harmonize-api"></span><h2>Harmonize Module<a class="headerlink" href="#harmonize-module" title="Permalink to this headline">¶</a></h2>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/geosnap.harmonize.harmonize.html#geosnap.harmonize.harmonize" title="geosnap.harmonize.harmonize"><code class="xref py py-obj docutils literal notranslate"><span class="pre">harmonize.harmonize</span></code></a>(raw_community[, …])</p></td>
<td><p>Use spatial interpolation to standardize neighborhood boundaries over time.</p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="visualize-module">
<span id="visualize-api"></span><h2>Visualize Module<a class="headerlink" href="#visualize-module" title="Permalink to this headline">¶</a></h2>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/geosnap.visualize.indexplot_seq.html#geosnap.visualize.indexplot_seq" title="geosnap.visualize.indexplot_seq"><code class="xref py py-obj docutils literal notranslate"><span class="pre">visualize.indexplot_seq</span></code></a>(df_traj, clustering)</p></td>
<td><p>Function for index plot of neighborhood sequences within each cluster.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/geosnap.visualize.explore.html#geosnap.visualize.explore" title="geosnap.visualize.explore"><code class="xref py py-obj docutils literal notranslate"><span class="pre">visualize.explore</span></code></a>([data])</p></td>
<td><p>Launch an interactive visualization portal.</p></td>
</tr>
</tbody>
</table>
</div>
</div>


    </div>
      
  </div>
</div>
<footer class="footer">
  <div class="container">
    <p class="pull-right">
      <a href="#">Back to top</a>
      
        <br/>
        
<div id="sourcelink">
  <a href="_sources/api.rst.txt"
     rel="nofollow">Source</a>
</div>
      
    </p>
    <p>
        &copy; Copyright 2020, geosnap developers.<br/>
      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.4.4.<br/>
    </p>
  </div>
</footer>
  </body>
</html>